FROM mysql:5.7.26
RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \
    mkdir -p /opt/sql
COPY ./init/ /docker-entrypoint-initdb.d/
COPY ./5.7/mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
ADD sql.tar.gz /opt
RUN chown -R mysql:mysql /docker-entrypoint-initdb.d/ && \
    chown -R mysql:mysql /opt/sql/